{% import '@SyliusAdmin/shared/helper/header.html.twig' as header %}

{% if hookable_metadata.context.metadata is defined and hookable_metadata.context.configuration is defined %}
    {% set configuration = hookable_metadata.context.configuration %}
    {% set metadata = hookable_metadata.context.metadata %}

    {% set singular_name = hookable_metadata.configuration.resource_name|default(metadata.applicationName ~ '.ui.' ~ _context.metadata.name) %}
    {% set header = hookable_metadata.configuration.header|default(null) %}
{% else %}
    {% set singular_name = hookable_metadata.configuration.resource_name %}
    {% set header = hookable_metadata.configuration.header %}
{% endif %}

<div class="col-12 col-md-6">
    <div class="d-md-flex gap-2 align-items-center">
        {{ header.h1(header is not null ? header|trans : 'sylius.ui.new'|trans ~ ' ' ~ singular_name|trans) }}
    </div>
</div>
